package com.example.waitnotify;

import com.example.mutil.SimpleMutilObject;

/**
 * @author:CrazyShaQiuShi
 * @email:3105334046@qq.com
 * @descript:
 * @version:1.0.0
 */
public class RunWith {

    public static void main(String[] args) throws InterruptedException {
        User user = new User();
        user.setId(1);
        user.setName("1name");
        Thread t1 = new SimpleMutilObject(user, "1");
        t1.setName("Thread1");
        t1.start();
        Thread.sleep(5000);
        t1.interrupt();
        // 改变参数值
        user.setId(2);
        user.setName("2name");
        Thread t2 = new SimpleMutilObject(user, "2");
        t2.setName("Thread2");
        t2.start();
        Thread.sleep(5000);
        t2.interrupt();
    }
}
